/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Assignment.DTO;

import Assignment.Util.DateAdapter;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 *
 * @author dieptn
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "User", propOrder = {
    "username",
    "password",
    "email",
    "realName",
    "dateOfBirth",
    "address",
    "city",
    "phone",
    "isAdmin"
})
@XmlRootElement(name="User")
public class UserDTO {

    @XmlElement(required = true)
    private String username;
    @XmlElement(required = true)
    private String password;
    @XmlElement(required = true, nillable=true)
    private String email;
    @XmlElement(required = true, nillable=true)
    private String realName;
    @XmlElement(required = true, nillable=true)
    private Date dateOfBirth;
    @XmlElement(required = true, nillable=true)
    private String address;
    @XmlElement(required = true, nillable=true)
    private String city;
    @XmlElement(required = true, nillable=true)
    private String phone;
    @XmlElement(required = true)
    private boolean isAdmin;

    public UserDTO() {
    }

    public UserDTO(String username, String password, String email, String realName, Date dateOfBirth, String address, String city, String phone, boolean isAdmin) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.realName = realName;
        this.dateOfBirth = dateOfBirth;
        this.address = address;
        this.city = city;
        this.phone = phone;
        this.isAdmin = isAdmin;
    }
    

    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the realName
     */
    public String getRealName() {
        return realName;
    }

    /**
     * @param realName the realName to set
     */
    public void setRealName(String realName) {
        this.realName = realName;
    }

    /**
     * @return the dateOfBirth
     */
    public Date getDateOfBirth() {
        return dateOfBirth;
    }

    /**
     * @param dateOfBirth the dateOfBirth to set
     */
    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    /**
     * @return the address
     */
    public String getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * @return the city
     */
    public String getCity() {
        return city;
    }

    /**
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * @return the isAdmin
     */
    public boolean getIsAdmin() {
        return isAdmin;
    }

    /**
     * @param isAdmin the isAdmin to set
     */
    public void setIsAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    }
}
